//
//  HBScrollViewEmptyBaseView.h
//  HBLibary
//
//  Created by Rambo on 2018/6/6.
//

#import <UIKit/UIKit.h>

typedef void(^HBScrollViewEmptyBaseViewTapBlock)(void);

@interface HBScrollViewEmptyBaseView : UIView


/**
 layoutsubview调用重新布局content
 */
- (void)emptyBaseView_layoutSubviews;

/**
 内容背景视图
 */
@property (nonatomic,strong,readonly)   UIView  *contentView;

/**
 图片
 */
@property (nonatomic, strong) UIImage *image;


/**
 标题
 */
@property (nonatomic, copy) NSString *title;


/**
 描述
 */
@property (nonatomic, copy) NSString *detail;


/**
 按钮标题
 */
@property (nonatomic, copy) NSString *buttonTitle;



/**
 emptyView的监听对象
 */
@property (nonatomic, weak, readonly) id viewTarget;


/**
 emptyView的监听对象方法
 */
@property (nonatomic, assign, readonly) SEL viewAction;


/**
 触摸emptyView回调
 */
@property (nonatomic, copy) HBScrollViewEmptyBaseViewTapBlock viewTapBlock;


/**
 按钮的监听对象
 */
@property (nonatomic, weak, readonly) id buttonTarget;


/**
 按钮的监听对象方法
 */
@property (nonatomic, assign, readonly) SEL buttonAction;


/**
 按钮点击回调
 */
@property (nonatomic, copy, readonly) HBScrollViewEmptyBaseViewTapBlock buttonActionBlock;


/**
 自定义View
 */
@property (nonatomic,strong, readonly)   UIView *customView;

/**
 初始化
 */
- (void)prepare;


/**
 创建emptyView
 
 @param image 图片
 @param title 标题
 @param detail 描述
 @param buttonTitle 按钮标题
 @param action 按钮点击回调
 @return emptyView
 */
+ (instancetype)emptyWithImage:(UIImage*)image title:(NSString*)title detail:(NSString*)detail buttonTitle:(NSString*)buttonTitle buttonActionTapBlock:(HBScrollViewEmptyBaseViewTapBlock)action;


/**
 创建emptyView
 
 @param image 图片
 @param title 标题
 @param detail 描述
 @param buttonTitle 按钮标题
 @param target 监听按钮点击对象
 @param action 监听按钮点击对象执行的方法
 @return emptyView
 */
+ (instancetype)emptyWithImage:(UIImage*)image title:(NSString*)title detail:(NSString*)detail buttonTitle:(NSString*)buttonTitle target:(id)target action:(SEL)action;


/**
 创建emptyView
 
 @param image 图片
 @param title 标题
 @param detail 描述
 @param emptyViewTapBlock 触摸emptyView
 @return emptyView
 */
+ (instancetype)emptyWithImage:(UIImage*)image title:(NSString*)title detail:(NSString*)detail emptyViewTapBlock:(HBScrollViewEmptyBaseViewTapBlock)emptyViewTapBlock;


/**
 创建emptyView

 @param image 图片
 @param title 标题
 @param detail 描述
 @param target 监听emptyView点击对象
 @param action 监听emptyView点击对象执行的方法
 @return emptyView
 */
+ (instancetype)emptyWithImage:(UIImage*)image title:(NSString*)title detail:(NSString*)detail target:(id)target action:(SEL)action;


/**
 自定义emptyView
 
 @param costomView 自定义emptyView
 @return emptyView
 */
+ (instancetype)emptyWithCostomView:(UIView*)costomView;

@end
